<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-extend 扩展实例</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
<h1>v-extend 扩展实例</h1>
<hr>
<div id="app">
    <author></author>
    <div id="author"></div>
</div>
<script type="text/javascript">
    var authorMsg=Vue.extend({
      template:`<p><a :href="authorURL">{{authorName}}</a></p>`,
      data(){
        return {
          authorURL:'http://www.baidu.com',
          authorName:'fesine'
        }
      }
    })
    // 组件选择器
    new authorMsg().$mount('author')
    //id选择器
    new authorMsg().$mount('#author')
</script>
</body>
</html>